package com.fuxin.app.services;

import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * @Author fuxin
 * @date 2019/2/26 22:08
 * @description
 */
@Service
@CacheConfig(cacheNames = "CacheService")
public class CacheService {

	@Cacheable(condition = "#id < 10")
	public long cache(int id){
		return System.currentTimeMillis();
	}
}
